package com.rockpaperscissorlhh.game;

import com.rockpaperscissorlhh.object.Computer;
import com.rockpaperscissorlhh.object.Person;
import com.rockpaperscissorlhh.result.Result;
import com.rockpaperscissorlhh.service.Rockpaperscissor;
import com.rockpaperscissorlhh.service.RockpaperscissorImpl;

import java.util.Random;
import java.util.Scanner;

public class PlayingGame {
    public static void main(String[] args) {
        Random random = new Random();
        Scanner scanner = new Scanner(System.in);
        Person person = new Person();
        Computer computer = new Computer();
        Rockpaperscissor standard = new RockpaperscissorImpl();
        System.out.println("Please enter the number of games:");
        Scanner number = new Scanner(System.in);
        int inputNumber = number.nextInt();
        for (int i = 0;i < inputNumber; i++) {
            person.setHand(scanner.nextInt());
            computer.setHand(random.nextInt(3));
            Result result = standard.gameStandard(person, computer);
            System.out.println(result);
        }
    }
}
